package org.example.myconfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration("ConfigurationBean")
public class ConfigurationBean {

    public ConfigurationBean() {
        System.out.println("ConfigurationBean开始构造");
    }

    @Bean
    public DemoBean demoBean(){
        DemoBean demoBean = new DemoBean();
        demoBean.setAge(100);
        return demoBean;
    }

}
